/**
 */
package gatperdut.chato.model.Chato.Room.impl;

import gatperdut.chato.model.Chato.Item.BoxInventory;
import gatperdut.chato.model.Chato.Room.Door;
import gatperdut.chato.model.Chato.Room.Room;
import gatperdut.chato.model.Chato.Room.RoomPackage;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.internal.cdo.CDOObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Room</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getTitle <em>Title</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getDescription <em>Description</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getN <em>N</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getE <em>E</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getS <em>S</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getW <em>W</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getU <em>U</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getD <em>D</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getDN <em>DN</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getDE <em>DE</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getDS <em>DS</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getDW <em>DW</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getDU <em>DU</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getDD <em>DD</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Room.impl.RoomImpl#getInventory <em>Inventory</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class RoomImpl extends CDOObjectImpl implements Room {
	/**
     * The default value of the '{@link #getTitle() <em>Title</em>}' attribute.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #getTitle()
     * @generated
     * @ordered
     */
	protected static final String TITLE_EDEFAULT = null;

	/**
     * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #getDescription()
     * @generated
     * @ordered
     */
	protected static final String DESCRIPTION_EDEFAULT = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	protected RoomImpl() {
        super();
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	protected EClass eStaticClass() {
        return RoomPackage.Literals.ROOM;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	protected int eStaticFeatureCount() {
        return 0;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public String getTitle() {
        return (String)eDynamicGet(RoomPackage.ROOM__TITLE, RoomPackage.Literals.ROOM__TITLE, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setTitle(String newTitle) {
        eDynamicSet(RoomPackage.ROOM__TITLE, RoomPackage.Literals.ROOM__TITLE, newTitle);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public String getDescription() {
        return (String)eDynamicGet(RoomPackage.ROOM__DESCRIPTION, RoomPackage.Literals.ROOM__DESCRIPTION, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setDescription(String newDescription) {
        eDynamicSet(RoomPackage.ROOM__DESCRIPTION, RoomPackage.Literals.ROOM__DESCRIPTION, newDescription);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Room getN() {
        return (Room)eDynamicGet(RoomPackage.ROOM__N, RoomPackage.Literals.ROOM__N, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Room basicGetN() {
        return (Room)eDynamicGet(RoomPackage.ROOM__N, RoomPackage.Literals.ROOM__N, false, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setN(Room newN) {
        eDynamicSet(RoomPackage.ROOM__N, RoomPackage.Literals.ROOM__N, newN);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Room getE() {
        return (Room)eDynamicGet(RoomPackage.ROOM__E, RoomPackage.Literals.ROOM__E, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Room basicGetE() {
        return (Room)eDynamicGet(RoomPackage.ROOM__E, RoomPackage.Literals.ROOM__E, false, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setE(Room newE) {
        eDynamicSet(RoomPackage.ROOM__E, RoomPackage.Literals.ROOM__E, newE);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Room getS() {
        return (Room)eDynamicGet(RoomPackage.ROOM__S, RoomPackage.Literals.ROOM__S, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Room basicGetS() {
        return (Room)eDynamicGet(RoomPackage.ROOM__S, RoomPackage.Literals.ROOM__S, false, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setS(Room newS) {
        eDynamicSet(RoomPackage.ROOM__S, RoomPackage.Literals.ROOM__S, newS);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Room getW() {
        return (Room)eDynamicGet(RoomPackage.ROOM__W, RoomPackage.Literals.ROOM__W, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Room basicGetW() {
        return (Room)eDynamicGet(RoomPackage.ROOM__W, RoomPackage.Literals.ROOM__W, false, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setW(Room newW) {
        eDynamicSet(RoomPackage.ROOM__W, RoomPackage.Literals.ROOM__W, newW);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Room getU() {
        return (Room)eDynamicGet(RoomPackage.ROOM__U, RoomPackage.Literals.ROOM__U, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Room basicGetU() {
        return (Room)eDynamicGet(RoomPackage.ROOM__U, RoomPackage.Literals.ROOM__U, false, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setU(Room newU) {
        eDynamicSet(RoomPackage.ROOM__U, RoomPackage.Literals.ROOM__U, newU);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Room getD() {
        return (Room)eDynamicGet(RoomPackage.ROOM__D, RoomPackage.Literals.ROOM__D, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Room basicGetD() {
        return (Room)eDynamicGet(RoomPackage.ROOM__D, RoomPackage.Literals.ROOM__D, false, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setD(Room newD) {
        eDynamicSet(RoomPackage.ROOM__D, RoomPackage.Literals.ROOM__D, newD);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Door getDN() {
        return (Door)eDynamicGet(RoomPackage.ROOM__DN, RoomPackage.Literals.ROOM__DN, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Door basicGetDN() {
        return (Door)eDynamicGet(RoomPackage.ROOM__DN, RoomPackage.Literals.ROOM__DN, false, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setDN(Door newDN) {
        eDynamicSet(RoomPackage.ROOM__DN, RoomPackage.Literals.ROOM__DN, newDN);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Door getDE() {
        return (Door)eDynamicGet(RoomPackage.ROOM__DE, RoomPackage.Literals.ROOM__DE, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Door basicGetDE() {
        return (Door)eDynamicGet(RoomPackage.ROOM__DE, RoomPackage.Literals.ROOM__DE, false, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setDE(Door newDE) {
        eDynamicSet(RoomPackage.ROOM__DE, RoomPackage.Literals.ROOM__DE, newDE);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Door getDS() {
        return (Door)eDynamicGet(RoomPackage.ROOM__DS, RoomPackage.Literals.ROOM__DS, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Door basicGetDS() {
        return (Door)eDynamicGet(RoomPackage.ROOM__DS, RoomPackage.Literals.ROOM__DS, false, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setDS(Door newDS) {
        eDynamicSet(RoomPackage.ROOM__DS, RoomPackage.Literals.ROOM__DS, newDS);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Door getDW() {
        return (Door)eDynamicGet(RoomPackage.ROOM__DW, RoomPackage.Literals.ROOM__DW, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Door basicGetDW() {
        return (Door)eDynamicGet(RoomPackage.ROOM__DW, RoomPackage.Literals.ROOM__DW, false, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setDW(Door newDW) {
        eDynamicSet(RoomPackage.ROOM__DW, RoomPackage.Literals.ROOM__DW, newDW);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Door getDU() {
        return (Door)eDynamicGet(RoomPackage.ROOM__DU, RoomPackage.Literals.ROOM__DU, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Door basicGetDU() {
        return (Door)eDynamicGet(RoomPackage.ROOM__DU, RoomPackage.Literals.ROOM__DU, false, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setDU(Door newDU) {
        eDynamicSet(RoomPackage.ROOM__DU, RoomPackage.Literals.ROOM__DU, newDU);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Door getDD() {
        return (Door)eDynamicGet(RoomPackage.ROOM__DD, RoomPackage.Literals.ROOM__DD, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Door basicGetDD() {
        return (Door)eDynamicGet(RoomPackage.ROOM__DD, RoomPackage.Literals.ROOM__DD, false, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setDD(Door newDD) {
        eDynamicSet(RoomPackage.ROOM__DD, RoomPackage.Literals.ROOM__DD, newDD);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public BoxInventory getInventory() {
        return (BoxInventory)eDynamicGet(RoomPackage.ROOM__INVENTORY, RoomPackage.Literals.ROOM__INVENTORY, true, true);
    }

	/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetInventory(BoxInventory newInventory, NotificationChain msgs) {
        msgs = eDynamicInverseAdd((InternalEObject)newInventory, RoomPackage.ROOM__INVENTORY, msgs);
        return msgs;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setInventory(BoxInventory newInventory) {
        eDynamicSet(RoomPackage.ROOM__INVENTORY, RoomPackage.Literals.ROOM__INVENTORY, newInventory);
    }

    /**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
        switch (featureID) {
            case RoomPackage.ROOM__INVENTORY:
                return basicSetInventory(null, msgs);
        }
        return super.eInverseRemove(otherEnd, featureID, msgs);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case RoomPackage.ROOM__TITLE:
                return getTitle();
            case RoomPackage.ROOM__DESCRIPTION:
                return getDescription();
            case RoomPackage.ROOM__N:
                if (resolve) return getN();
                return basicGetN();
            case RoomPackage.ROOM__E:
                if (resolve) return getE();
                return basicGetE();
            case RoomPackage.ROOM__S:
                if (resolve) return getS();
                return basicGetS();
            case RoomPackage.ROOM__W:
                if (resolve) return getW();
                return basicGetW();
            case RoomPackage.ROOM__U:
                if (resolve) return getU();
                return basicGetU();
            case RoomPackage.ROOM__D:
                if (resolve) return getD();
                return basicGetD();
            case RoomPackage.ROOM__DN:
                if (resolve) return getDN();
                return basicGetDN();
            case RoomPackage.ROOM__DE:
                if (resolve) return getDE();
                return basicGetDE();
            case RoomPackage.ROOM__DS:
                if (resolve) return getDS();
                return basicGetDS();
            case RoomPackage.ROOM__DW:
                if (resolve) return getDW();
                return basicGetDW();
            case RoomPackage.ROOM__DU:
                if (resolve) return getDU();
                return basicGetDU();
            case RoomPackage.ROOM__DD:
                if (resolve) return getDD();
                return basicGetDD();
            case RoomPackage.ROOM__INVENTORY:
                return getInventory();
        }
        return super.eGet(featureID, resolve, coreType);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case RoomPackage.ROOM__TITLE:
                setTitle((String)newValue);
                return;
            case RoomPackage.ROOM__DESCRIPTION:
                setDescription((String)newValue);
                return;
            case RoomPackage.ROOM__N:
                setN((Room)newValue);
                return;
            case RoomPackage.ROOM__E:
                setE((Room)newValue);
                return;
            case RoomPackage.ROOM__S:
                setS((Room)newValue);
                return;
            case RoomPackage.ROOM__W:
                setW((Room)newValue);
                return;
            case RoomPackage.ROOM__U:
                setU((Room)newValue);
                return;
            case RoomPackage.ROOM__D:
                setD((Room)newValue);
                return;
            case RoomPackage.ROOM__DN:
                setDN((Door)newValue);
                return;
            case RoomPackage.ROOM__DE:
                setDE((Door)newValue);
                return;
            case RoomPackage.ROOM__DS:
                setDS((Door)newValue);
                return;
            case RoomPackage.ROOM__DW:
                setDW((Door)newValue);
                return;
            case RoomPackage.ROOM__DU:
                setDU((Door)newValue);
                return;
            case RoomPackage.ROOM__DD:
                setDD((Door)newValue);
                return;
            case RoomPackage.ROOM__INVENTORY:
                setInventory((BoxInventory)newValue);
                return;
        }
        super.eSet(featureID, newValue);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public void eUnset(int featureID) {
        switch (featureID) {
            case RoomPackage.ROOM__TITLE:
                setTitle(TITLE_EDEFAULT);
                return;
            case RoomPackage.ROOM__DESCRIPTION:
                setDescription(DESCRIPTION_EDEFAULT);
                return;
            case RoomPackage.ROOM__N:
                setN((Room)null);
                return;
            case RoomPackage.ROOM__E:
                setE((Room)null);
                return;
            case RoomPackage.ROOM__S:
                setS((Room)null);
                return;
            case RoomPackage.ROOM__W:
                setW((Room)null);
                return;
            case RoomPackage.ROOM__U:
                setU((Room)null);
                return;
            case RoomPackage.ROOM__D:
                setD((Room)null);
                return;
            case RoomPackage.ROOM__DN:
                setDN((Door)null);
                return;
            case RoomPackage.ROOM__DE:
                setDE((Door)null);
                return;
            case RoomPackage.ROOM__DS:
                setDS((Door)null);
                return;
            case RoomPackage.ROOM__DW:
                setDW((Door)null);
                return;
            case RoomPackage.ROOM__DU:
                setDU((Door)null);
                return;
            case RoomPackage.ROOM__DD:
                setDD((Door)null);
                return;
            case RoomPackage.ROOM__INVENTORY:
                setInventory((BoxInventory)null);
                return;
        }
        super.eUnset(featureID);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public boolean eIsSet(int featureID) {
        switch (featureID) {
            case RoomPackage.ROOM__TITLE:
                return TITLE_EDEFAULT == null ? getTitle() != null : !TITLE_EDEFAULT.equals(getTitle());
            case RoomPackage.ROOM__DESCRIPTION:
                return DESCRIPTION_EDEFAULT == null ? getDescription() != null : !DESCRIPTION_EDEFAULT.equals(getDescription());
            case RoomPackage.ROOM__N:
                return basicGetN() != null;
            case RoomPackage.ROOM__E:
                return basicGetE() != null;
            case RoomPackage.ROOM__S:
                return basicGetS() != null;
            case RoomPackage.ROOM__W:
                return basicGetW() != null;
            case RoomPackage.ROOM__U:
                return basicGetU() != null;
            case RoomPackage.ROOM__D:
                return basicGetD() != null;
            case RoomPackage.ROOM__DN:
                return basicGetDN() != null;
            case RoomPackage.ROOM__DE:
                return basicGetDE() != null;
            case RoomPackage.ROOM__DS:
                return basicGetDS() != null;
            case RoomPackage.ROOM__DW:
                return basicGetDW() != null;
            case RoomPackage.ROOM__DU:
                return basicGetDU() != null;
            case RoomPackage.ROOM__DD:
                return basicGetDD() != null;
            case RoomPackage.ROOM__INVENTORY:
                return getInventory() != null;
        }
        return super.eIsSet(featureID);
    }

} //RoomImpl
